Skip to content

Fix early call to return/throw on generator#51294

Merged
rbuckton merged 1 commit intomainfrom
fix49831
Oct 25, 2022
Merged

Fix early call to return/throw on generator#51294
rbuckton merged 1 commit intomainfrom
fix49831

Conversation

@rbuckton
Copy link
Copy Markdown
Contributor

@rbuckton rbuckton commented Oct 24, 2022

This fixes an issue with downlevel generators not properly handling an initial call to g.return() or g.throw() when the generator is still in the "suspendedStart" state, per GeneratorResumeAbrupt.

More details about what this change does will be documented in the tslib PR, which includes documentation on the workings of the __generator helper.

Fixes #49831

Loading
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Milestone Bug PRs that fix a bug with a specific milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

generator function polyfill bug when call generator iterator throw method

3 participants